﻿using System;
using System.Data;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace com.net
{
    #region Subject 
    public class Subject
    {
        int subid;
        string subject;
        string note;

        public Subject() { }
        public Subject(int subid, String subject, string note)
        {
            this.subid = subid;
            this.subject = subject;
            this.note = note;
        }
        public int SubID
        {
            get { return subid; }
            set { subid = value; }
        }
        public string SubjectText
        {
            get { return subject.ToUpper(); }
            set { subject = value; }
        }
        public string Note
        {
            get { return note; }
            set { note = value; }
        }

    }
    #endregion
    
    #region Qtype
    public class QType
    {
        int qtypeid;
        string qtype;
        public QType() { }
        public QType(int qtypeid, string qtype)
        {
            this.qtypeid = qtypeid;
            this.qtype = qtype;
        }
        public int QtypeID { get { return qtypeid; } set { qtypeid = value; } }
        public string QuestionType { get { return qtype.ToUpper(); } set { qtype = value; } }
    }
    #endregion

    #region Domain
    public class Domain
    {
        int domainid;
        string domain;
        string note;

        public Domain() { }
        public Domain(int domainid, string domain, string note)
        {
            this.domain = domain;
            this.domainid = domainid;
            this.note = note;
        }
        public int DomainID { get { return domainid; } set { domainid = value; } }
        public string DomainName { get { return domain.ToUpper(); } set { domain = value; } }
        public string Note { get { return note; } set { note = value; } }
    }
    #endregion

    #region Level
    public class Level
    {
        int levelid;
        string level;
        public Level() { }
        public Level(int leveid, string level)
        {
            this.levelid = levelid;
            this.level = level;
        }
        public int LevelID{ get { return levelid; } set { levelid= value; } }
        public string LevelName{ get { return level.ToUpper(); } set { level = value; } }
    }
    #endregion

    #region QBank
    public class QBank
    {
        int qno;
        Level levelid = new Level();
        QType qtypeid = new QType();
        Subject subid = new Subject();
        Domain domainid = new Domain();
        string qtext;
        int qans;
        bool hide;
        string addedby;
        DateTime addeddate;
        public List<QBankOpt> Options = new List<QBankOpt>();

        public QBank() { }
        public QBank(int qno, int levelid, int qtypeid, int subid, int domainid, string qtext, string addedby)
        {
            this.qno = qno;
            this.levelid.LevelID = levelid;
            this.qtypeid.QtypeID = qtypeid;
            this.subid.SubID = subid;
            this.domainid.DomainID = domainid;
            this.qtext = qtext;
            this.addedby = addedby;
        }
        public int Qno { get { return qno; } set { qno = value; } }
        public Level LevelID { get { return levelid; } set { levelid = levelid; } }
        public QType QtyleID { get { return qtypeid; } set { qtypeid = value; } }
        public Subject SubID { get { return subid; } set { subid = value; } }
        public Domain DomainID { get { return domainid; } set { domainid = value; } }
        public string QText { get { return qtext; } set { qtext = value; } }
        public int QAns { get { return qans; } set { qans = value; } }
        public bool Hide { get { return hide; } set { hide = value; } }
        public string AddedBy { get { return addedby; } set { addedby = value; } }
        public DateTime AddedDate { get { return addeddate; } set { addeddate = value; } }

    }

    #endregion

    #region QBankOpt

    public class QBankOpt
    {
        int optid;
        int qno;
        string optext;

        public QBankOpt() { }
        public QBankOpt(int optid, int qno, string optext)
        {
            this.optext = optext;
            this.optid = optid;
            this.qno = qno;
        }
        public QBankOpt(int qno, string optext)
        {
            this.optext = optext;
            this.qno = qno;
        }
        public int Qno { get { return qno; } set { qno = value; } }
        public string OpText { get { return optext; } set { optext = value; } }
        public int OptID { get { return optid; } set { optid = value; } }
    }
    #endregion

    #region Login
     public class Login
    {
         string username="";
         string password="";
         string userrole="";
         DateTime lastlogin;
         DateTime logincreate;
         string status="";

         public Login() { }
         public Login(string username, string password)
         {
             this.username = username;
             this.password = password;
         }
         public Login(string username, string password, string userrole)
         {
             this.username = username;
             this.password = password;
             this.userrole = userrole;
         }
         public string Username
         {
             get { return username; }
             set { username = value; }
         }
         public string Password
         {
             get { return password; }
             set { password = value; }
         }
         public string UserRole
         {
             get { return userrole; }
             set { userrole = value; }
         }
         public DateTime LastLogin { get { return lastlogin; } set { lastlogin = value; } }
         public DateTime LoginCreated { get { return logincreate; } set { logincreate = value; } }
         public string Status { get { return status; } set { status = value; } }
    }
#endregion
}